﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Test
{



    //只能在当前项目中访问类
    internal class Student
    {
        //定义私有的静态的整型字段student_id
        private static int student_id;

        //定义私有的只读的字段id
        private readonly int id;

        //定义公开的只读的字符串类型字段student_name
        public readonly string student_name;

        //定义公开的静态的字符串类型字段name
        public readonly string name;

        //定义内部的静态的整型字段student_age
        internal static int student_age;

        //定义内部的只读的整型字段age
        internal readonly int age;

        //定义只能由类或派生类中的代码访问的只读的整型字段student_sex
        protected readonly int student_sexr;

        //定义只能由类或派生类中的代码访问的静态的整型字段number
        protected static int number;
    }





    //抽象的只能在当前项目中访问类
    internal abstract class Student1
    {
        //抽象定义私有的静态的整型字段student_id
        private static int student_id;

        //抽象定义私有的只读的字段id
        private readonly int id;

        //抽象定义公开的只读的字符串类型字段student_name
        public readonly string student_name;

        //抽象定义公开的静态的字符串类型字段name
        public readonly string name;

        //抽象定义内部的静态的整型字段student_age
        internal static int student_age;

        //抽象定义内部的只读的整型字段age
        internal readonly int age;

        //抽象定义只能由类或派生类中的代码访问的只读的整型字段student_sex
        protected readonly int student_sexr;

        //抽象定义只能由类或派生类中的代码访问的静态的整型字段number
        protected static int number;

    }




    //密封的只能在当前项目中访问类
    internal sealed class Student2
    {
        //密封定义私有的静态的整型字段student_id
        private static int student_id;

        //密封定义私有的只读的字段id
        private readonly int id;

        //密封定义公开的只读的字符串类型字段student_name
        public readonly string student_name;

        //密封定义公开的静态的字符串类型字段name
        public readonly string name;

        //密封定义内部的静态的整型字段student_age
        internal static int student_age;

        //密封定义内部的只读的整型字段age
        internal readonly int age;

        //密封定义只能由类或派生类中的代码访问的只读的整型字段student_sex
        protected readonly int student_sexr;

        //密封定义只能由类或派生类中的代码访问的静态的整型字段number
        protected static int number;




        //静态的只能在当前项目中访问类
        internal static class Student3
        {
            //静态的定义私有的静态的整型字段student_id
            private static int student_id;


            //静态的定义内部的静态的整型字段student_age
            internal static int student_age;


        }



    }


}

